package com.apex.util;

import java.util.HashMap;
import java.util.Map;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-4-8
 */
public class ResponseMessage {

    /**返回真确状态**/
    public static final boolean RESULT_TRUE=true;

    public static final boolean RESULT_FALSE=false;

    public static final String CODE_SUCCESS="0";//正确

    public static final String CODE_ERROR_PARAM="001";//参数错误

    public static final String CODE_ERROR_UNUSUAL="002";//参数不完整

    public static final String CODE_ERROR_AUTHO="003";//权限错误

    private static Map<String,Object> map=null;


    public static Map<String, Object> getMap() {
        map=new HashMap<>();
        map.put("result",RESULT_FALSE);
        map.put("code",CODE_ERROR_PARAM);
        return map;
    }

    public static Map<String,Object> getTrueMap(){
        map=new HashMap<>();
        map.put("result",RESULT_TRUE);
        map.put("code",CODE_SUCCESS);
        map.put("msg","");
        return map;
    }
}